home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Temático 40 Febrero 2004.iso / DOS / ntfs / dos / fnctdsk.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-11  |  4.4 KB  |  97 lines

  1. /*
  2.  
  3.     File: fnctdsk.h
  4.  
  5.     Copyright (C) 1998-2001  Christophe Grenier <grenier@nef.esiea.fr>
  6.   
  7.     This software is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.   
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.   
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  */
  22.  
  23. #define s_head(E) ((E)[1])
  24. #define s_sect(E) (((E)[2]) & 0x3F)
  25. #define s_cyl(E)  (((((E)[2]) & 0xC0)<<2) | ((E)[3]))
  26. #define e_head(E) ((E)[5])
  27. #define e_sect(E) (((E)[6]) & 0x3F)
  28. #define os(E)     ((E)[4])
  29. #define ind_boot(E) ((E)[0])
  30. #define e_cyl(E)  (word)(((((E)[6]) & 0xC0)<<2) | ((E)[7]))
  31.  
  32. dword CHS2SR(t_param_disk_cst disk_car,const word, const byte, const byte);
  33. dword CHS2SRext(t_param_disk_cst disk_car,const uint, const uint, const uint);
  34. word byte_per_sector(t_sector_cst);
  35. uint sect_per_cluster(t_sector_cst);
  36. uint sect_reserv(t_sector_cst);
  37. uint nbr_fats(t_sector_cst);
  38. uint nbr_rootdir(t_sector_cst);
  39. dword nbr_sectB1(t_sector_cst);
  40. uint media_descr(t_sector_cst);
  41. word sect_per_FAT(t_sector_cst);
  42. dword sect_per_FAT32(t_sector_cst);
  43. word sect_per_track(t_sector_cst);
  44. word nbr_side(t_sector_cst);
  45. dword hidden_sect(t_sector_cst);
  46. dword nbr_sectB2(t_sector_cst);
  47. dword NT_sect(t_sector_cst);
  48. byte NT_clustersize(t_sector_cst);
  49.  
  50. int bootable(t_entree_cst E);
  51. dword sect_rel(t_entree_cst);
  52. dword nbr_sect(t_entree_cst);
  53. dword get_sect_s(t_param_disk_cst disk_car,t_entree_cst);
  54. dword get_sect_e(t_param_disk_cst disk_car, t_entree_cst);
  55. void fill_t_diskext(t_diskext, t_disk_cst, t_disk_cst,
  56.     const unsigned int,const dword);
  57. int test_over(t_param_disk_cst disk_car,t_entree_cst, t_entree_cst);
  58. dword debut_abs_entree(t_param_disk_cst disk_car,t_entree_cst, t_disk_cst);
  59. dword debut_rel_entree(t_entree_cst);
  60. dword fin_abs_entree(t_param_disk_cst disk_car,t_entree_cst, t_disk_cst);
  61. dword fin_rel_entree(t_entree_cst);
  62. dword CHS2SR2(t_param_disk_cst disk_car,const t_CHS*CHS);
  63. dword get_SR(t_param_disk_cst disk_car,t_disk_cst);
  64. dword get_SR_part(t_param_disk_cst disk_car,t_diskext_cst);
  65. dword get_SR_param_disk(t_param_disk_cst);
  66. dword get_LBA(t_param_disk_cst disk_car,t_disk_cst);
  67. dword get_LBA_part(t_param_disk_cst disk_car,t_diskext_cst);
  68. dword get_LBA_param_disk(t_param_disk_cst);
  69. t_disk set_pos(t_param_disk_cst disk_car,t_disk, dword);
  70. t_diskext set_posexts(t_param_disk_cst disk_car,t_diskext, dword);
  71. t_diskext set_posexte(t_param_disk_cst disk_car,t_diskext, dword);
  72. void disk_avant(t_param_disk_cst disk_car,t_disk);
  73. void disk_apres(t_param_disk_cst disk_car,t_disk);
  74. void disk_avant(t_param_disk_cst disk_car,t_disk);
  75. void disk_apres_ext(t_param_disk_cst disk_car,t_diskext);
  76. t_disk entree_s2pos(t_param_disk_cst disk_car,t_entree_cst, t_disk_cst, t_disk);
  77. t_disk entree_e2pos(t_param_disk_cst disk_car,t_entree_cst, t_disk_cst, t_disk);
  78. void partition2entree(t_param_disk_cst disk_car,dword, t_diskext_cst, t_entree *);
  79. void build_entree(t_param_disk_cst disk_car,t_disk_cst, t_disk_cst, t_disk_cst, uchar, t_entree*);
  80. int entree2partition(t_param_disk_cst disk_car,dword pos,t_diskext partition, t_entree_cst entree, int status);
  81. const char* errmsg_entree2partition(int errcode);
  82. int read_MBR(t_param_disk_cst disk_car,void *buffer);
  83. int read_ext(t_param_disk_cst disk_car,void *buffer, const t_diskext partition);
  84. int write_MBR(t_param_disk_cst disk_car,void *buffer);
  85. int write_ext(t_param_disk_cst disk_car,void *buffer, const t_diskext partition);
  86. int write_clean_table(t_param_disk_cst);
  87. int write_MBR_code(t_param_disk_cst);
  88. void dup_t_CHS(t_CHS * CHS_dest, const t_CHS * CHS_source);
  89. int compare_CHS(const t_CHS *CHS1, const t_CHS *CHS2);
  90. int compare2uint(uint a, uint b);
  91. void set_pos2(t_param_disk_cst disk_car, t_CHS * CHS, const dword sect);
  92. t_list_part add_new_partition(t_list_part old, t_list_part new);
  93. t_list_part insert_new_partition(t_list_part old, t_list_part new);
  94. t_list_part sort_list_part(t_list_part list_part);
  95. int compar_diskext(const t_diskext a, const t_diskext b);
  96. int check_list_part(t_list_part list_part);
  97.